/* See COPYRIGHT for copyright information. */

#ifndef JOS_KERN_TRAP_H
#define JOS_KERN_TRAP_H
#ifndef JOS_KERNEL
# error "This is a JOS kernel header; user programs should not #include it"
#endif

#include <inc/trap.h>
#include <inc/types.h>
#include <inc/mmu.h>

/* The kernel's interrupt descriptor table */
extern struct Gatedesc idt[];
extern struct Pseudodesc idt_pd;

void trap_init(void);
void trap_init_percpu(void);
void print_regs(struct PushRegs *regs);
void print_trapframe(struct Trapframe *tf);
void page_fault_handler(struct Trapframe *);
void backtrace(struct Trapframe *);

extern void vector0();
extern void vector1();
extern void vector2();
extern void vector3();
extern void vector4();
extern void vector5();
extern void vector6();
extern void vector7();
extern void vector8();
extern void vector10();
extern void vector11();
extern void vector12();
extern void vector13();
extern void vector14();
extern void vector16();
extern void vector17();
extern void vector18();
extern void vector19();
extern void vector48();
extern void vector500();

#endif /* JOS_KERN_TRAP_H */
